// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by sidekick. DO NOT EDIT.

/// A dyn-compatible, crate-private version of [super::OsConfigService].
#[async_trait::async_trait]
pub trait OsConfigService: std::fmt::Debug + Send + Sync {
    async fn execute_patch_job(
        &self,
        req: crate::model::ExecutePatchJobRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::PatchJob>>;

    async fn get_patch_job(
        &self,
        req: crate::model::GetPatchJobRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::PatchJob>>;

    async fn cancel_patch_job(
        &self,
        req: crate::model::CancelPatchJobRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::PatchJob>>;

    async fn list_patch_jobs(
        &self,
        req: crate::model::ListPatchJobsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListPatchJobsResponse>>;

    async fn list_patch_job_instance_details(
        &self,
        req: crate::model::ListPatchJobInstanceDetailsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListPatchJobInstanceDetailsResponse>>;

    async fn create_patch_deployment(
        &self,
        req: crate::model::CreatePatchDeploymentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::PatchDeployment>>;

    async fn get_patch_deployment(
        &self,
        req: crate::model::GetPatchDeploymentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::PatchDeployment>>;

    async fn list_patch_deployments(
        &self,
        req: crate::model::ListPatchDeploymentsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListPatchDeploymentsResponse>>;

    async fn delete_patch_deployment(
        &self,
        req: crate::model::DeletePatchDeploymentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>>;

    async fn update_patch_deployment(
        &self,
        req: crate::model::UpdatePatchDeploymentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::PatchDeployment>>;

    async fn pause_patch_deployment(
        &self,
        req: crate::model::PausePatchDeploymentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::PatchDeployment>>;

    async fn resume_patch_deployment(
        &self,
        req: crate::model::ResumePatchDeploymentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::PatchDeployment>>;

    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn cancel_operation(
        &self,
        req: longrunning::model::CancelOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>>;
}

/// All implementations of [super::OsConfigService] also implement [OsConfigService].
#[async_trait::async_trait]
impl<T: super::OsConfigService> OsConfigService for T {
    /// Forwards the call to the implementation provided by `T`.
    async fn execute_patch_job(
        &self,
        req: crate::model::ExecutePatchJobRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::PatchJob>> {
        T::execute_patch_job(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_patch_job(
        &self,
        req: crate::model::GetPatchJobRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::PatchJob>> {
        T::get_patch_job(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn cancel_patch_job(
        &self,
        req: crate::model::CancelPatchJobRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::PatchJob>> {
        T::cancel_patch_job(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_patch_jobs(
        &self,
        req: crate::model::ListPatchJobsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListPatchJobsResponse>> {
        T::list_patch_jobs(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_patch_job_instance_details(
        &self,
        req: crate::model::ListPatchJobInstanceDetailsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListPatchJobInstanceDetailsResponse>>
    {
        T::list_patch_job_instance_details(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn create_patch_deployment(
        &self,
        req: crate::model::CreatePatchDeploymentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::PatchDeployment>> {
        T::create_patch_deployment(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_patch_deployment(
        &self,
        req: crate::model::GetPatchDeploymentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::PatchDeployment>> {
        T::get_patch_deployment(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_patch_deployments(
        &self,
        req: crate::model::ListPatchDeploymentsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListPatchDeploymentsResponse>> {
        T::list_patch_deployments(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_patch_deployment(
        &self,
        req: crate::model::DeletePatchDeploymentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>> {
        T::delete_patch_deployment(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_patch_deployment(
        &self,
        req: crate::model::UpdatePatchDeploymentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::PatchDeployment>> {
        T::update_patch_deployment(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn pause_patch_deployment(
        &self,
        req: crate::model::PausePatchDeploymentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::PatchDeployment>> {
        T::pause_patch_deployment(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn resume_patch_deployment(
        &self,
        req: crate::model::ResumePatchDeploymentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::PatchDeployment>> {
        T::resume_patch_deployment(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::get_operation(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn cancel_operation(
        &self,
        req: longrunning::model::CancelOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>> {
        T::cancel_operation(self, req, options).await
    }
}

/// A dyn-compatible, crate-private version of [super::OsConfigZonalService].
#[async_trait::async_trait]
pub trait OsConfigZonalService: std::fmt::Debug + Send + Sync {
    async fn create_os_policy_assignment(
        &self,
        req: crate::model::CreateOSPolicyAssignmentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn update_os_policy_assignment(
        &self,
        req: crate::model::UpdateOSPolicyAssignmentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn get_os_policy_assignment(
        &self,
        req: crate::model::GetOSPolicyAssignmentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::OSPolicyAssignment>>;

    async fn list_os_policy_assignments(
        &self,
        req: crate::model::ListOSPolicyAssignmentsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListOSPolicyAssignmentsResponse>>;

    async fn list_os_policy_assignment_revisions(
        &self,
        req: crate::model::ListOSPolicyAssignmentRevisionsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListOSPolicyAssignmentRevisionsResponse>>;

    async fn delete_os_policy_assignment(
        &self,
        req: crate::model::DeleteOSPolicyAssignmentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn get_os_policy_assignment_report(
        &self,
        req: crate::model::GetOSPolicyAssignmentReportRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::OSPolicyAssignmentReport>>;

    async fn list_os_policy_assignment_reports(
        &self,
        req: crate::model::ListOSPolicyAssignmentReportsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListOSPolicyAssignmentReportsResponse>>;

    async fn get_inventory(
        &self,
        req: crate::model::GetInventoryRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Inventory>>;

    async fn list_inventories(
        &self,
        req: crate::model::ListInventoriesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListInventoriesResponse>>;

    async fn get_vulnerability_report(
        &self,
        req: crate::model::GetVulnerabilityReportRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::VulnerabilityReport>>;

    async fn list_vulnerability_reports(
        &self,
        req: crate::model::ListVulnerabilityReportsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListVulnerabilityReportsResponse>>;

    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn cancel_operation(
        &self,
        req: longrunning::model::CancelOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>>;

    fn get_polling_error_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_error_policy::PollingErrorPolicy>;

    fn get_polling_backoff_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_backoff_policy::PollingBackoffPolicy>;
}

/// All implementations of [super::OsConfigZonalService] also implement [OsConfigZonalService].
#[async_trait::async_trait]
impl<T: super::OsConfigZonalService> OsConfigZonalService for T {
    /// Forwards the call to the implementation provided by `T`.
    async fn create_os_policy_assignment(
        &self,
        req: crate::model::CreateOSPolicyAssignmentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::create_os_policy_assignment(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_os_policy_assignment(
        &self,
        req: crate::model::UpdateOSPolicyAssignmentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::update_os_policy_assignment(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_os_policy_assignment(
        &self,
        req: crate::model::GetOSPolicyAssignmentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::OSPolicyAssignment>> {
        T::get_os_policy_assignment(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_os_policy_assignments(
        &self,
        req: crate::model::ListOSPolicyAssignmentsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListOSPolicyAssignmentsResponse>> {
        T::list_os_policy_assignments(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_os_policy_assignment_revisions(
        &self,
        req: crate::model::ListOSPolicyAssignmentRevisionsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListOSPolicyAssignmentRevisionsResponse>>
    {
        T::list_os_policy_assignment_revisions(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_os_policy_assignment(
        &self,
        req: crate::model::DeleteOSPolicyAssignmentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::delete_os_policy_assignment(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_os_policy_assignment_report(
        &self,
        req: crate::model::GetOSPolicyAssignmentReportRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::OSPolicyAssignmentReport>> {
        T::get_os_policy_assignment_report(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_os_policy_assignment_reports(
        &self,
        req: crate::model::ListOSPolicyAssignmentReportsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListOSPolicyAssignmentReportsResponse>>
    {
        T::list_os_policy_assignment_reports(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_inventory(
        &self,
        req: crate::model::GetInventoryRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Inventory>> {
        T::get_inventory(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_inventories(
        &self,
        req: crate::model::ListInventoriesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListInventoriesResponse>> {
        T::list_inventories(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_vulnerability_report(
        &self,
        req: crate::model::GetVulnerabilityReportRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::VulnerabilityReport>> {
        T::get_vulnerability_report(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_vulnerability_reports(
        &self,
        req: crate::model::ListVulnerabilityReportsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListVulnerabilityReportsResponse>>
    {
        T::list_vulnerability_reports(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::get_operation(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn cancel_operation(
        &self,
        req: longrunning::model::CancelOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>> {
        T::cancel_operation(self, req, options).await
    }

    fn get_polling_error_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_error_policy::PollingErrorPolicy> {
        T::get_polling_error_policy(self, options)
    }

    fn get_polling_backoff_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_backoff_policy::PollingBackoffPolicy> {
        T::get_polling_backoff_policy(self, options)
    }
}
